package tech.aistar.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserAddress implements Serializable {

  private Integer id;
  private Integer userId;
  private String receiver;
  private String phone;
  private String province;
  private String city;
  private String district;
  private String detail;
  private Integer isDefault;

  @JsonProperty("create_time") // 指定JSON字段名为create_time
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 格式化时间
  private LocalDateTime createTime;
}